package com.study.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author biandan
 * @description
 * @signature 让天下没有难写的代码
 * @create 2021-06-16 下午 7:34
 */
@RestController
public class MyController {

    SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @GetMapping("/")
    public String index() {
        String msg = "If you can see this page, you've succeeded！！";
        return msg + "现在是北京时间：" + SDF.format(new Date());
    }

}
